5 CLS:S=-1:PRINT
10 PRINT "ENTER THE TIME AS HHMM OR HHMMSS":PRINT
15 INPUT "ENTER NEW TIME: ";TS$
20 H1=VAL(MID$(TS$,1,1))
25 IF H1 < 0 OR H1 > 1 THEN PRINT "THE HOUR SHOULD BE BETWEEN 01 AND 12": PRINT: GOTO 15
30 H2=VAL(MID$(TS$,2,1))
35 IF H2 < 0 OR H2 > 9 THEN PRINT "THE HOUR SHOULD BE BETWEEN 01 AND 12": PRINT: GOTO 15
40 M1=VAL(MID$(TS$,3,1))
45 IF M1 < 0 OR M1 > 5 THEN PRINT "THE MINUTE SHOULD BE BETWEEN 00 AND 59": PRINT: GOTO 15
50 M2=VAL(MID$(TS$,4,1))
55 IF M2 < 0 OR M2 > 9 THEN PRINT "THE MINUTE SHOULD BE BETWEEN 00 AND 59": PRINT: GOTO 15
60 IF MID$(TS$,5,1) = "" THEN GOTO 75
65 S=VAL(MID$(TS$,5,2))
70 IF S < 0 OR S > 59 THEN PRINT "THE SECONDS SHOULD BE BETWEEN 00 AND 59": PRINT: GOTO 15
75 POKE 36370,H1: POKE 36371,H2: POKE 36372,M1: POKE 36373,M2
80 IF S = -1 THEN END
85 POKE 36374,S: POKE 36375,0

